//@author A0083782W
#include "OperationType.h"

void REPEAT_RULE::reset() {
	frequency = RepeatFrequency::NO_REPEAT;
	period = 0;
	startOfWeek = WeekDay::UNCLEAR;
}

void MARK_STRUCT::reset() {
	IDs.clear();
	IDs.shrink_to_fit();
	filters.clear();
	filters.shrink_to_fit();
}

void SEARCH_STRUCT::reset() {
	tags.clear();
	tags.shrink_to_fit();
	filters.clear();
	filters.shrink_to_fit();
}

void MODIFY_STRUCT::reset() {
	IDs.clear();
	IDs.shrink_to_fit();
	modifyInfo.clear();
	modifyInfo.shrink_to_fit();
}

MODIFY_STRUCT::MODIFY_STRUCT() {
	reset();
}

//@author A0101056Y
bool REPEAT_RULE::operator == (const REPEAT_RULE& rightOperand) const{
	if (frequency == rightOperand.frequency &&
		startOfWeek == rightOperand.startOfWeek &&
		period == rightOperand.period){
			return true;
	}
	else{
		return false;
	}
}